﻿// 余杰yujie

namespace sgf.server
{
    public class BaseMgr
    {
        public BusActor busActor;

        protected T? GetMgr<T>() where T : BaseMgr
        {
            return busActor.GetMgr<T>();
        }

        protected T? GetBus<T>() where T : BusActor
        {
            if (busActor.GetType() == typeof(T))
            {
                return (T)busActor;
            }

            return null;
        }

        public virtual void Init()
        {
        }

        public virtual async Task InitSync()
        {
        }
    }
}